<div class="error_message">
    <?php if (validation_errors()) { ?>
        <div class="col-md-12">
            <div class="alert alert-danger" role="alert">
                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                <span>Error:</span>
                <?php echo validation_errors(); ?>
            </div>
        </div>
    <?php } ?>
    <?php if ($this->session->flashdata('error')) { ?>
        <div class="col-md-12">
            <div class="alert alert-danger" role="alert">
                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                <span>Error:</span>
                <?php echo $this->session->flashdata('error'); ?>
            </div>
        </div>
    <?php } ?>
    <?php if ($this->session->flashdata('success')) { ?>
        <div class="col-md-12">
            <div class="alert alert-success" role="alert">
                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                <span>Success:</span>
                <?php echo $this->session->flashdata('success'); ?>
            </div>
        </div>
    <?php } ?>
    <?php if (isset($form_error_message) && $form_error_message) { ?>
        <div class="col-md-12">
            <div class="alert alert-danger" role="alert">
                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                <span>Error:</span>

                <p><?php echo $form_error_message; ?></p>
            </div>
        </div>
    <?php } ?>
</div>